using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Resources;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace KPIS.GERP.Models.ICM
{
	[DataContract, Table("IcmReceiveR")]
    public class ReceiveR
    {
        public ReceiveR()
        {
            this.ReceiveRs = new HashSet<ReceiveR>();
        }

		[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
		[DataMember, Display(Name = "ReceiveId", ResourceType = typeof(Resources.ReceiveRResource))]
        public int ReceiveId { get; set; }

		[DataMember, Display(Name = "ReceiveCode", ResourceType = typeof(Resources.ReceiveRResource))]
        public string ReceiveCode { get; set; }

        [ForeignKey("ReceiveR")]
		[DataMember, Display(Name = "TransMasId", ResourceType = typeof(Resources.ReceiveRResource))]
        public Nullable<int> TransMasId { get; set; }

		[ForeignKey("ResItem")]
		[DataMember, Display(Name = "ResItemId", ResourceType = typeof(Resources.ReceiveRResource))]
        public Nullable<int> ResItemId { get; set; }

		[DataMember, Display(Name = "Quantity", ResourceType = typeof(Resources.ReceiveRResource))]
        public Nullable<double> Quantity { get; set; }

		[DataMember, Display(Name = "Price", ResourceType = typeof(Resources.ReceiveRResource))]
        public Nullable<double> Price { get; set; }

		[DataMember, Display(Name = "QuantityRemainBefore", ResourceType = typeof(Resources.ReceiveRResource))]
        public Nullable<double> QuantityRemainBefore { get; set; }

		[DataMember, Display(Name = "QuantityRemainAfter", ResourceType = typeof(Resources.ReceiveRResource))]
        public Nullable<double> QuantityRemainAfter { get; set; }

		[DataMember, Display(Name = "QuantityRemain", ResourceType = typeof(Resources.ReceiveRResource))]
        public Nullable<double> QuantityRemain { get; set; }

		[DataMember, Display(Name = "ReceiveDate", ResourceType = typeof(Resources.ReceiveRResource))]
        public Nullable<System.DateTime> ReceiveDate { get; set; }

		[DataMember, Display(Name = "AssetCodeStart", ResourceType = typeof(Resources.ReceiveRResource))]
        public string AssetCodeStart { get; set; }

		[DataMember, Display(Name = "AssetCodeFinish", ResourceType = typeof(Resources.ReceiveRResource))]
        public string AssetCodeFinish { get; set; }

		[DataMember, Display(Name = "Remark", ResourceType = typeof(Resources.ReceiveRResource))]
        public string Remark { get; set; }

		[DataMember, Display(Name = "RecordStatus", ResourceType = typeof(Resources.ReceiveRResource))]
        public string RecordStatus { get; set; }

		[DataMember, Display(Name = "CreatedBy", ResourceType = typeof(Resources.ReceiveRResource))]
        public Nullable<int> CreatedBy { get; set; }

		[DataMember, Display(Name = "CreatedWhen", ResourceType = typeof(Resources.ReceiveRResource))]
        public Nullable<System.DateTime> CreatedWhen { get; set; }

		[DataMember, Display(Name = "UpdatedBy", ResourceType = typeof(Resources.ReceiveRResource))]
        public Nullable<int> UpdatedBy { get; set; }

		[DataMember, Display(Name = "UpdatedWhen", ResourceType = typeof(Resources.ReceiveRResource))]
        public Nullable<System.DateTime> UpdatedWhen { get; set; }

		[DataMember, Display(Name = "CutStockBy", ResourceType = typeof(Resources.ReceiveRResource))]
        public Nullable<int> CutStockBy { get; set; }

		[DataMember, Display(Name = "CutStockWhen", ResourceType = typeof(Resources.ReceiveRResource))]
        public Nullable<System.DateTime> CutStockWhen { get; set; }

        [DataMember ]
        public virtual ICollection<ReceiveR> ReceiveRs { get; set; }
         
		public virtual ICM.MasResourceItem ResItem { get; set; }

    }
}